from math import factorial
from decimal import Decimal
import argparse


def birthday_paradox_probability(n, k):
    if k > n:
        return 1.0

    numberator = factorial(n)
    denominator = (n ** k) * factorial(n - k)
    no_duplicate_probability = numberator / denominator
    at_least_one_duplicate_probability = 1 - no_duplicate_probability

    return at_least_one_duplicate_probability


if __name__ == '__main__':
    parser = argparse.ArgumentParser('')
    parser.add_argument('--number', type=int, default='100')
    parser.add_argument('--k', type=int, default='50')
    args = parser.parse_args()

    print(f'{birthday_paradox_probability(args.number, args.k)}')
